<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DecimalFormat"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!doctype html>
<html lang="en">
  <head>
    
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="网络程序设计(苏航)-期末作业">
    <meta name="author" content="赵云雷">
    <meta name="student number" content="18061119">
    <title>云雷书店</title>


    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" ></script>


    <style>
      .bd-placeholder-img {
        font-size: 1.125rem;
        text-anchor: middle;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }

      @media (min-width: 768px) {
        .bd-placeholder-img-lg {
          font-size: 3.5rem;
        }
      }
      .mybutton{
          display:flex;
      }
    </style>

    
    <!-- Custom styles for this template -->
    <link href="jumbotron.css" rel="stylesheet">
  </head>
  <body>
    <%@ include file="tabBar.jsp"%> 
    
    
    <div class="jumbotron">
    <table class="table">
        <thead class="thead-dark">
        <tr>
            <th scope="col">编号</th>
            <th scope="col">总价格</th>
            <th scope="col">下单时间</th>
        </tr>
        </thead>
        <tbody>
            <% ArrayList<String> orders = (ArrayList)session.getAttribute("orders");%>
            <% if (orders != null) {%>
                <% for(int i = 0; i < orders.size(); i = i + 2) {%>
                    <tr>
                        <td><%=i/2 + 1%></td>
                        <td><%=orders.get(i)%></td>
                        <td><%=orders.get(i+1)%></td>
                    </tr>
                <% } %>
            <% } %>
        </tbody>
    </table>
    
    </div>
  </body>
</html>
